package com.fei.cloudeurekaconsumer.config;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonConfig {

    @Bean
    public IRule ribbonRulr() {

        /**
         * 轮训模式
         */
        return new RoundRobinRule();
        /**
         * 随机模式
         */
        // return new RandomRule();
    }

}
